import { defineStore } from 'pinia'

const useCounterStore = defineStore('counter', () => {
  const counter = ref(0)
  const isLogin = ref(false)


  const increment = () => {
    counter.value++
  }
  const isLoginChange= (val) =>{
    isLogin.value = val
  }

  return {
    counter,
    isLogin,
    isLoginChange,
    increment,
  }
}, {
  persist: true,
})

export default useCounterStore
